import datetime
from applications.extensions import db


class YeLog(db.Model):
    __tablename__ = 'ye_log'
    __table_args__ = ({'comment': '日志表  -保存执行过程中产生的日志'})  # 添加表注释
    id = db.Column(db.Integer, autoincrement=True, primary_key=True, comment="表id")
    log_content = db.Column(db.String(500), comment="日志内容")
    log_type = db.Column(db.String(50), comment="日志类型")
    create_time = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
    update_time = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now, comment='更新时间')

